#pragma once

#ifndef _CPACKET_H_
#define _CPACKET_H_

#include "CChar.h"
#include "CBasicPacket.h"

class CPacket
{
private:
	CPacket(void);
	~CPacket(void);

public:
	static int CPacket::makePacketsReadable(char * recvbuf, int recvSize, CChar * schar, struct Settings * s);
	static int CPacket::genGamePacket(char * output, char * recvbuf, union PacketData pd, unsigned long recvSize, char special, unsigned long * compressTable, CChar * schar);
	static int CPacket::genLobbyPacket(char * output, char * recvbuf, struct connections* r);
	static int loadPacket(char * filename, unsigned char * buf, unsigned short num);
	static int CPacket::loadPacket2(char * filename, unsigned char * buf, unsigned short num, int ani);
	static int CPacket::isUnencrypted(char * recvbuf, int recvSize);
	static int CPacket::sendPremadePacket(unsigned char * data, unsigned short num, CComm * comm);
	static int CPacket::sendPremadeCPacket(unsigned char * data, unsigned short num, CBasicPacket *packet);

	static int CPacket::sendServerTell( char* from, char* to, char* text);

	//gets values off a packed buffer and returns a pointer to the unpacked values ( shifts the inbuffer )
	//static void CPacket::getPackedValues(byte* inbuf, int size, int num, byte *outbuf);
};
#endif